package com.snopy.collection.set;

import java.util.*;
import java.util.stream.Collectors;

/**
 * @author snopy
 * @version 1.0.0
 * @classname DemoSet
 * @description
 * @email 77912204@qq.com
 * @date 2022/07/28 13:14
 */
public class DemoSet {

    public static <hpp> void main(String[] args) {
        Set<String> set0 = new HashSet<>();
        String str2 = "a";
        String str3 = "c";
        String str4 = "b";
        String g = "g";
        String h = "h";
        String e = "e";
        set0.add(str2);
        LinkedHashSet<String> lhs = new LinkedHashSet<>();
        lhs.add(str2);
        lhs.add(str3);
        lhs.add(str4);
        lhs.add(g);
        lhs.add(h);
        lhs.add(e);
        List<String> list = new ArrayList<>();
        HashSet<String> strings = new HashSet<>(list);
        Set<String> collect = list.stream().filter(s -> s.contains("1")).collect(Collectors.toSet());

    }
}
